<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>通用兄弟选择器</title>
    <style>
        li {
            list-style: none;
        }

        .li-target,.li-target2 {
            color: red;
        }

        .li-target~li {
            color: #00FF00;
        }

        .li-target2~.li2 {
            color: #00FFCC;
        }
    </style>
</head>
<body>
    <h1>通用兄弟选择器</h1>
    <p>E~F</p>
    <p>选择E后面的所有同级兄弟</p>
    <ul class="ul">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li class="li-target">我</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
    </ul>

    <ul class="ul">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li class="li-target2">我</li>
        <li>5</li>
        <li class="li2">6</li>
        <li class="li2">7</li>
    </ul>
</body>
</html>